package com.fan.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fan.entity.DemoEntity;
import com.fan.mapper.DemoMapper;
import com.fan.service.DemoService;
import com.fan.vo.DemoVO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class DemoServiceImpl implements DemoService {

    @Resource
    private DemoMapper demoMapper;

    @Override
    public void save(DemoEntity demoEntity) {
        demoMapper.save(demoEntity);
    }

    @Override
    public int deleteById(int id) {
        return demoMapper.deleteById(id);
    }

    @Override
    public int update(DemoEntity demoEntity) {
        return demoMapper.update(demoEntity);
    }

    @Override
    public DemoEntity selectById(int id) {
        return demoMapper.selectById( id);
    }

    @Override
    public Page<DemoEntity> selectPage() {
        return null;
    }

    public DemoVO getDemoVOResultMapById(){
        return demoMapper.getDemoVOResultMapById(1);
    }

    public DemoVO getDemoVOById(){
        return demoMapper.getDemoVOById(1);
    }
}
